<script setup lang="ts">
import axios from "axios";
import macros from "../macros.ts";
import {ref} from "vue";
import {useRoute} from "vue-router"
const route=useRoute();
var i=route.params.id;

var photo=ref<string>();
axios.get(macros.server+"/api/photo",{params: {id:i}})
    .then(function (response){
      photo.value=response.data.data.photolink;
    }).catch(function (error){
  alert(error);
  console.log(error);
});

</script>

<template>
  <img class="mx-auto d-block img-fluid" :src="photo" style="width: 100vw" id="photo"/>
</template>
<style scoped>

</style>